package lxh.grails.basic;

int x = 1;
while(x < 5)
	print x++;
println "";

for(i in 1..10)
	print i;
println ""

for(i in 1..<10)
	print i;
println ""

for(i in ["aaa", "bbb"])
	print i;
println "";

int[] arr = [1,2,3];
for(i in arr)
	print i+" ";
println "";

def map = ["aaa":1, "bbb":2];
for(i in map)
	print i.key+i.value+" ";
println "";

for(i in map.keySet())
	print i+" ";
println "";

for(i in map.values())
	print i+" ";
println "";
	
def list = [];
for(i in "abc")
	list.add(i);
println list;
assert list == ["a", "b", "c"];


